import request from '@/utils/request'
// 查询违章列表1
export function listIllegal(query) {
    return request({
        url: '/carViolation/list',
        method: 'get',
        params: query
    })
}
// 查询车辆违章列表统计信息1
export function queryCarViolationStatistics(query) {
    return request({
        url: '/carViolation/queryCarViolationStatistics',
        method: 'get',
        params: query
    })
}

// 查询违章详细1
export function getIllegal(id) {
    return request({
        url: '/carViolation/' + id,
        method: 'get'
    })
}

// 获取车辆违章消息提醒记录1
export function getCarViolationMessageList(carViolationId) {
    return request({
        url: '/carViolation/getCarViolationMessageList/' + carViolationId,
        method: 'get'
    })
}

// 查询车辆违章记录列表1
export function queryCarViolationRecord(carId) {
    return request({
        url: '/carViolation/queryCarViolationRecord/' + carId,
        method: 'get'
    })
}

// 查询车辆违章记录统计数据1
export function queryCarViolationInfoStatistics(carId) {
    return request({
        url: '/carViolation/queryCarViolationInfoStatistics/' + carId,
        method: 'get'
    })
}
export function queryCarViolationInfoStatisticsByCarNo(carNo) {
    return request({
        url: '/carViolation/queryCarViolationInfoStatisticsByCarNo/' + carNo,
        method: 'get'
    })
}
// 查询车辆违章汇总列表1
export function carViolationSummary(query) {
    return request({
        url: '/carViolationSummary/list',
        method: 'get',
        params: query
    })
}
// 查询车辆违章汇总统计1
export function carViolationSummarystatistics(query) {
    return request({
        url: '/carViolationSummary/statistics',
        method: 'get',
        params: query
    })
}
// 查询车辆违章汇总详情1
export function carViolationSummarydetail(query) {
    return request({
        url: '/carViolationSummary/detail',
        method: 'get',
        params: query
    })
}

// 查询违章工单分页列表1
export function illegalWorkOrderPage(query) {
    return request({
        url: '/car/illegalWorkOrder/queryPageList',
        method: 'get',
        params: query
    })
}

// 查询违章工单详情1
export function illegalWorkOrderDetail(id) {
    return request({
        url: '/car/illegalWorkOrder/' + id,
        method: 'get'
    })
}

// 保存违章工单1
export function illegalAcountCreate(data) {
    return request({
        url: '/car/illegalWorkOrder/save',
        method: 'post',
        data: data
    })
}

// 保存违章工单账户1
export function workOrderAccountSave(data) {
    return request({
        url: '/car/workOrderAccount/save',
        method: 'post',
        data: data
    })
}

// 查询违章工单账号列表 1
export function illegalAccountList(query) {
    return request({
        url: '/car/workOrderAccount/pageList',
        method: 'get',
        params: query
    })
}

// 查询违章工单车辆分页列表 1
export function queryIllegalWorkOrderCar(query) {
    return request({
        url: '/car/illegalWorkOrder/queryIllegalWorkOrderCar',
        method: 'get',
        params: query
    })
}

// 修改违章查询账号信息 1
export function upDateIllegalAcount(data) {
    return request({
        url: '/car/workOrderAccount/update',
        method: 'post',
        data: data
    })
}

// 违章查询账号启用禁用修改1
export function workOrderAccount(data) {
    return request({
        url: '/car/workOrderAccount/status',
        method: 'post',
        data: data
    })
}

//违章-地区列表 1
export function carsurvieladdr(){
    return request({
        url:'/car/workOrderAccount/regionList',
        method:'get',
    })
}

//获取违章查询账号信息1
export function illegalAcountDetail(illegalQueryAccountId){
    return request({
        url:'/car/workOrderAccount/'+illegalQueryAccountId,
        method:'get',
    })
}





// 新增违章
export function addIllegal(data) {
    return request({
        url: '/car/illegal',
        method: 'post',
        data: data,
        mmv: true,
    })
}

// 修改违章
export function updateIllegal(data) {
    return request({
        url: '/car/illegal',
        method: 'put',
        data: data,
        mmv: true,
    })
}

// 删除违章
export function delIllegal(id) {
    return request({
        url: '/car/illegal/' + id,
        method: 'delete'
    })
}

// 导出违章
export function exportIllegal(query) {
    return request({
        url: '/car/illegal/export',
        method: 'get',
        params: query
    })
}

//违章列表统计
export function illegalCount(){
    return request({
        url:'/car/illegal/index',
        method:'get',
    })
}

//违章预警配置
export function illegalSet(){
    return request({
        url:'/car/illegal/violationWarning',
        method:'get',
    })
}

//违章统计
export function illegalStatics(query){
    return request({
        url:'/car/illegal/vehicleViolationStatistics',
        method:'get',
        params:query
    })
}


// 创建违章工单
export function addIllegalWorkOrder(data) {
    return request({
        url: '/car/illegalWorkOrder/insert',
        method: 'post',
        data:data
    })
}

// 违章工单-查询车辆列表
export function illegalWorkOrderCarList(id,query) {
    return request({
        url: '/car/illegalWorkOrder/'+id + '/cars',
        method: 'get',
        params: query
    })
}

// 违章工单-查询违章结果
export function illegalWorkOrderResult(id,query) {
    return request({
        url: '/car/illegalWorkOrder/'+id + '/illegals',
        method: 'get',
        params: query
    })
}

// 违章工单-查询违章结果导出
export function illegalWorkOrderResultExport(id) {
    return request({
        url: '/car/illegalWorkOrder/' +id + '/illegals/export',
        method: 'get'
    })
}

// 获取账户余额信息
export function accountBalanceInfo() {
    return request({
        url: '/account-balance/info',
        method: 'get'
    })
}

// 账户余额充值
export function accountBalanceRecharge(data) {
    return request({
        url: '/account-balance/recharge',
        method: 'post',
        data: data
    })
}

// 账户余额充值消费记录查询
export function accountBalanceRecordList(query) {
    return request({
        url: '/account-balance/record/page',
        method: 'get',
        params: query
    })
}

// 违章查询账号配置公司
export function illegalAcountDeploy(data) {
    return request({
        url: '/illegal_query_account/deploy_org',
        method: 'post',
        data: data
    })
}

// 违章查询账号删除
export function deleteIllegalAcount(data) {
    return request({
        url: '/illegal_query_account/delete',
        method: 'post',
        data: data
    })
}

// 违章查询账号 - 获取所属公司列表
export function illegalAcountOrgList() {
    return request({
        url: '/illegal_query_account/org_list',
        method: 'get'
    })
}

//违章查询地区编码集合
export function illegalAcountAddressList(){
    return request({
        url:'/illegal_query_account/addr_list',
        method:'get',
    })
}


//拥有的违章查询账号类型种类
export function illegalAcountContainType(){
    return request({
        url:'/illegal_query_account/contain_type',
        method:'get',
    })
}

//创建违章工单车辆统计数量
export function illegalOrderCarCount(data){
    return request({
        url:'/car/illegalWorkOrder/insert_car_count',
        method: 'post',
        data:data
    })
}
